import 'package:hktk_app/model/package/package_model.dart';

/// 通过栏目获取的相关购买套餐
class ColumnPackageModel {
  PackageModel? package;
  List<String>? productIds;

  ColumnPackageModel({this.package, this.productIds});

  ColumnPackageModel.fromJson(Map<String, dynamic> json) {
    package =
        json['package'] != null ? PackageModel.fromJson(json['package']) : null;
    productIds = json['productIds'].cast<String>();
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = <String, dynamic>{};
    if (package != null) {
      data['package'] = package!.toJson();
    }
    data['productIds'] = productIds;
    return data;
  }
}
